package org.taobao.lxw.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.taobao.lxw.bean.Comments;
import org.taobao.lxw.dao.ICommentDao;
import org.taobao.lxw.service.ICommentService;
@Service
public class CommentService implements ICommentService{
	@Autowired 
	ICommentDao dao;

	@Override
	public Integer getCommentsCountBySid(Integer sid) {
		return dao.getCommentsCountBySid(sid);
	}

	@Override
	public List<Comments> getAllCommentPageById(Integer sid, Integer pageIndex, Integer pageSize) {
		return dao.getAllCommentPageById(sid, pageIndex, pageSize);
	}

	@Override
	public Comments getCommentById(Integer id ) {
		return dao.getCommentById(id);
	}

	@Override
	public List<Comments> getCommentsByName(Integer sid,String name) {
		return dao.getCommentsByName(sid,name);
	}

	@Override
	public List<Comments> getCommentByOid(Integer oid) {
		return dao.getCommentByOid(oid);
	}

	@Override
	public Comments getCommentByIdAndSid(Integer id, Integer sid) {
		return dao.getCommentByIdAndSid(id, sid);
	}
}
